package com.yc.jiushujie.jsj_order.controller;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yc.jiushujie.entity.JsjBook;
import com.yc.jiushujie.entity.JsjSearch;
import com.yc.jiushujie.jsj_order.mapper.JsjSearchMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import javax.naming.directory.SearchControls;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 无罪
 * @since 2022-08-03
 */
@RestController
@RequestMapping("/jiushujie/jsjSearch")
public class JsjSearchController {
@Resource
   private JsjSearchMapper jsjSearchMapper;
@RequestMapping("queryHotsou")
public List<JsjSearch>queryHotsou(){
    IPage<JsjSearch> page=new Page<>(1,50);
    page.orders().add(OrderItem.desc("id"));
    page=jsjSearchMapper.selectPage(page,null);
    return page.getRecords();
}
}

